package com.tunan.lsj.id.impl;

import java.util.List;
import java.util.Map;
import java.util.UUID;

import com.tunan.lsj.id.IKeyGenerator;
import com.tunan.persistence.model.TSysUser;


/**
 * @author sfw
 *
 */
public class UuidKeyGenerator extends AbstractGenerator implements IKeyGenerator{

	
	private static final long serialVersionUID = 3818290559552999638L;

	/**
	 * 构造器
	 */
	public UuidKeyGenerator () {
		super();		
	}
	

	/**
	 * 获得一个UUID
	 * 
	 * @return String UUID
	 */
	public static String getUUID() {
		String s = UUID.randomUUID().toString();
		// 去掉“-”符号
		return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18)
				+ s.substring(19, 23) + s.substring(24);
	}


	public String createKey(TSysUser user, Map model) {
		// TODO 自动生成方法存根
		
	
		String id=getUUID();
	    return id;
	}


}
